import { Module } from '@nestjs/common';
import { DbService } from './db.service';
import { TypeOrmModule } from '@nestjs/typeorm';
import { DefaultDbConfigService } from './config.service';

@Module({
  imports: [
    TypeOrmModule.forRootAsync({
      name: 'default',
      useClass: DefaultDbConfigService
    })
  ],
  providers: [DbService],
  exports: [DbService],
})
export class DbModule {}
